import axios from "~/utils/myaxios";

// 登录功能
export const login = data => {
  return axios({
    method: 'post',
    url: '/accounts/login',
    data
  });
};

// 注册功能
export const register = data => {
  return axios({
    method: 'post',
    url: '/accounts/register',
    data
  });
};

// 发送验证码
export const sendCaptcha = tel => {
  return axios({
    method: 'post',
    url: '/captchas',
    data: { tel }
  });
};